<ui:composition template="/template/template-professor.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets">

    <ui:define name="corpo">
        <h:form id="pa">
            <p:growl id="message" showDetail="true" life="5000"/>

            <div style="font-size: 13px !important; padding-bottom: 5% !important;">
                <p:panel>
                    <table style="margin-left: auto; margin-right: auto;">
                        <tr>
                            <td style="text-align: left;" > <h:outputText value="Retirada: "/> </td>
                            <td style="text-align: center;"> <p:inputMask id="Retirada" value="#{cadastraFitoSManagedBean.retirada}" mask="99/99/9999" disabled="true" /> </td>
                        </tr>
                        <tr>
                            <td style="text-align: left;"> <h:outputText value="Disponivel para busca?"/> </td>
                            <td style="text-align: center;"> <p:selectBooleanCheckbox value="#{cadastraFitoSManagedBean.fitos.disponivel}"/> </td>
                        </tr>
                    </table>

                    <p:separator />

                    <p:dataTable id="FSF" var="fsfoto" value="#{cadastraFitoSManagedBean.fitos.fsfotoList}" widgetVar="fsfTable"
                                 emptyMessage="Não foram encontradas fotos" paginator="true" rows="10">

                        <p:column id="idFoto" headerText="Foto">
                            <h:outputText value="#{fsfoto.foto}"/>
                        </p:column>

                        <p:column id="Seleção">
                            <p:commandButton icon="ui-icon-pencil"/>
                        </p:column>

                    </p:dataTable>

                    <p:panel>
                        <h:outputText value="Clique no botão enviar antes de finalizar para realizar o cadastro das imagens!" style="color: #e33b06;"/>
                    </p:panel>
                    <!--Foto de Fitolito - FSFoto -->
                    <p:fileUpload id="fuFito"
                                  fileUploadListener="#{cadastraFitoSManagedBean.handleFileUploadFSFoto}"
                                  mode="advanced"
                                  update="message"
                                  multiple="true"
                                  sizeLimit="10000000"
                                  allowTypes="/(\.|\/)(jpg|jpeg|bmp|BMP)$/"
                                  style="font-size: 13px !important; text-align: left !important; padding-top: 4% !important;"
                                  label="Escolher"
                                  uploadLabel="Enviar"
                                  cancelLabel="Cancelar">
                    </p:fileUpload>

                    <p:commandButton value="Concluir" action="#{cadastraFitoSManagedBean.changeFitos}"/>
                    <p:commandButton style="margin-bottom: 35px !important; margin-top: 20px !important;" value="Cancelar" id="Submit" 
                                     action="../conteudo-professor/gerenciar-list-fitop.xhtml?faces-redirect=true"/>

                </p:panel>
            </div>

        </h:form>
    </ui:define>
</ui:composition>